<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/access_limited_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:orientation="vertical"
        android:visibility="gone"
        tools:visibility="gone">

        <ImageView
            android:id="@+id/warning_icon"
            android:layout_width="60dp"
            android:layout_height="60dp"
            android:layout_marginStart="24dp"
            app:srcCompat="@drawable/ic_warning"
            app:tint="?attr/colorAccent" />

        <TextView
            android:id="@+id/access_limited_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="24dp"
            android:layout_marginStart="24dp"
            android:layout_marginTop="8dp"
            android:fontFamily="sans-serif-medium"
            android:text="@string/account_access_limited"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="20sp" />

        <TextView
            android:id="@+id/access_limited_reason"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="24dp"
            android:layout_marginStart="24dp"
            android:text="@string/account_access_limited_reason" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="24dp"
            android:orientation="vertical">

            <Button
                android:id="@+id/retry_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/retry_btn"
                app:backgroundTint="@color/accentColorVariant" />
        </LinearLayout>

    </LinearLayout>

    <androidx.drawerlayout.widget.DrawerLayout
        android:id="@+id/drawer_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <com.google.android.material.appbar.AppBarLayout
                    android:id="@+id/app_bar"
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <dev.tinelix.jabwave.ui.views.base.JabwaveActionBar
                        android:id="@+id/actionbar"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:background="?attr/actionBarColor"
                        android:minHeight="?attr/actionBarSize"
                        android:theme="@style/ApplicationTheme.Toolbar.Dark"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:navigationIcon="@drawable/ic_menu"
                        app:contentInsetLeft="0dp"
                        app:contentInsetStart="0dp"
                        app:contentInsetStartWithNavigation="0dp">

                        <include layout="@layout/layout_actionbar"/>

                    </dev.tinelix.jabwave.ui.views.base.JabwaveActionBar>
                </com.google.android.material.appbar.AppBarLayout>

            <androidx.fragment.app.FragmentContainerView
                android:id="@+id/app_fragment"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_gravity="center"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/app_bar" />

            <include
                android:id="@+id/progress"
                layout="@layout/layout_progress"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/app_bar" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <com.google.android.material.navigation.NavigationView
            android:id="@+id/nav_view"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:fitsSystemWindows="true"
            android:theme="@style/ApplicationTheme.Navigation"
            app:headerLayout="@layout/header_drawer"
            app:itemIconTint="@color/menuItemColor"
            app:itemTextColor="@color/menuItemColor"
            app:menu="@menu/app_nav_drawer" />

    </androidx.drawerlayout.widget.DrawerLayout>
</androidx.appcompat.widget.LinearLayoutCompat>